The data used in my analysis are descriptive vessel tracking information from Global Fishing Watch that I supplemented with net primary productivity data from a SESYNC shiny app. Both components are briefly described below and fully described in my project documentation.
# Longline data
str(longline_full) # longline data has 65,499 observations and 11 data fields
## 'data.frame': 65499 obs. of 11 variables:
## $ X : int 1 2 3 4 5 6 7 8 9 10 ...
## $ mmsi : num 1.26e+13 1.26e+13 1.26e+13 1.26e+13 1.26e+13 ...
## $ timestamp : int 1327136504 1327136605 1327136734 1327143281 1327143341 1327143411 1327146440 1327149860 1327149911 1327156390 ...
## $ distance_from_shore: num 232994 233994 233994 233994 233996 ...
## $ distance_from_port : num 311749 312410 312410 315417 316173 ...
## $ speed : num 8.2 7.3 6.8 6.9 6.1 ...
## $ course : num 230 238 239 252 231 ...
## $ lat : num 14.9 14.9 14.9 14.8 14.8 ...
## $ lon : num -26.9 -26.9 -26.9 -26.9 -26.9 ...
## $ is_fishing : int -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...
## $ source : Factor w/ 1 level "dalhousie_longliner": 1 1 1 1 1 1 1 1 1 1 ...
# counts
count(longline_full, longline_full$is_fishing == 0) # 1,397 'not fishing' statuses (2.13% not fishing)
count(longline_full, longline_full$is_fishing == 1) # 2,792 'fishing' statuses (4.26% fishing)
count(longline_full, longline_full$is_fishing == -1) # 61,310 'no data' statuses (93.6% unknown -- eliminate these)
# narrow data to only include instances of 'fishing' and 'not fishing'
longline_fishing <- filter(longline_full, is_fishing %in% c(0, 1))
class(longline_fishing$mmsi)
## [1] "numeric"
unique(longline_fishing$mmsi) # 2 unique mmsi IDs in the data set
## [1] 1.263956e+13 5.139444e+13
longline_fishing$mmsi <- as.factor(longline_fishing$mmsi)
longline_fishing$mmsi <-
recode(longline_fishing$mmsi, "12639560807591" = "Vessel 1", "51394439323066" = "Vessel 2")
# (the rest of cleanup)
# did: is_fishing, mmsi
# do: date format, select relevant fields, changed names
# joined npp data
Exploring the data in space revealed that the two tracked vessels were fishing in two different parts of the world.
<This map shows both vessel 1 observations (in the east Atlantic between Spain and Africa) and vessel 2 observations (in the eastern Pacific between Washington state and Alaska).>Here the extent is narrowed to show just vessel 1 observations.
<This map shows vessel 1 observations distinguished by the presence or ansence of fishing activity. Yellow signifies points where the vessel was determined to be fishing while purple signifies points where it was not.>Here is an exploratory view of the additional data included for each observation point.
## Warning: 'mapview::sync' is deprecated.
## Use 'leafsync::sync' instead.
## See help("Deprecated") and help("leafsync-deprecated").
## Warning: 'mapview::latticeView' is deprecated.
## Use 'leafsync::latticeView' instead.
## See help("Deprecated") and help("mapview-deprecated").
Here the extent is narrowed to show just vessel 1 observations.
<This map shows vessel 2 observations distinguished by the fishing activity, yellow signifies fishing while purple signifies not fishing.>
Here is an exploratory view of the additional data included for each observation point.
## Warning: 'mapview::sync' is deprecated.
## Use 'leafsync::sync' instead.
## See help("Deprecated") and help("leafsync-deprecated").
## Warning: 'mapview::latticeView' is deprecated.
## Use 'leafsync::latticeView' instead.
## See help("Deprecated") and help("mapview-deprecated").